#ifndef GWENRENDERER_H
#define GWENRENDERER_H
#include "Gwen/BaseRender.h"
#include "Gwen/Gwen.h"
#include "StompedReality/Asset/FontManager.h"
#include "StompedReality/Asset/TextureSystem.h"
#include "StompedReality/Core.h"
#include "StompedReality/Core/GameAccess.h" // Base class: stomped_reality::GameAccess
namespace StomperLib
{
namespace GwenBinding
{
class DLL_EXPORT GwenRenderer : public StompedReality::GameAccess,
  public Gwen::Renderer::Base {
 protected:

  char* UnicodeConvert( const wchar_t* text, int len );

 public:

  GwenRenderer( );
  virtual ~GwenRenderer( );
  bool intialize( );
  void Begin( );
  void End( );
  void SetDrawColor( Gwen::Color color );
  void DrawFilledRect( Gwen::Rect rect );
  void StartClip( );
  void EndClip( );
  void LoadTexture( Gwen::Texture* pTexture );
  void FreeTexture( Gwen::Texture* pTexture );
  void DrawTexturedRect( Gwen::Texture* pTexture, Gwen::Rect pTargetRect,
                         float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f );
  void LoadFont( Gwen::Font* pFont );
  void FreeFont( Gwen::Font* pFont );
  void RenderText( Gwen::Font* pFont, Gwen::Point pos, const Gwen::UnicodeString& text );
  Gwen::Point MeasureText( Gwen::Font* pFont, const Gwen::UnicodeString& text );
  Gwen::Color PixelColour( Gwen::Texture* pTexture, unsigned int x, unsigned int y, const Gwen::Color& col_default );
};

}
}
#endif // GWENRENDERER_H
